<?php
	include_once('themes/head.php');	
	include_once('controller/testimoniController.php');
	
	 
?>
<?php
	if(isset($error))
	{
		echo '<div class="alert alert-error" id="alert">Salah ! '.$error.' 
			<button type="button" class="close" data-dismiss="alert" id="close">×</button></div>';
	}
	if(isset($success))
	{
		echo '<div class="alert alert-success">'.$success.'</div>';
	}
	 
		else
		{
	?>
<style type="text/css">
<!--
.style1 {
	font-size: medium;
	font-weight: bold;
	color: #336699;
}
-->
</style>

<div id="form" class="testimoni_form">
					<pre><h2>  PENGISIAN TESTIMONI </h2></pre>
					<h5>  Silakan mengisi form Testimoni di bawah ini :</h5	>
					<div></div>
					<form class="form-horizontal" method="post" action="#">
					
					
					
						<div class="control-group">
							<label class="control-label" for="inputTentang">Tentang *</label>
								<div class="controls">
									<input type="text" name="tentang" id="inputTentang" placeholder="Tentang">
								</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputIsi_testi">Isi Testimoni *</label>
								<div class="controls">
									<textarea row="3" placeholder="Isi_testi" name="isi_testi"></textarea>
								</div>
						</div>
						<div class="control-group">
							<div class="controls">
								<button type="submit" name="simpan_testimoni" class="btn" id="daftar_btn">Simpan</button>
								<button type="batal" name="batal" class="btn" id="batal">Batal</button>
							</div>
						</div>
					</form>
	                <p class="style1">&nbsp;</p>
	                <p class="style1">LIST TESTIMONI ANTAR PENGGUNA SAYCO </p>
</div> 
<!-- end form -->

	
	
	<div id="testimoniList">
	<table style="width: 750px; margin: 0 auto 60px;" cellpadding="1" cellspacing="1" class="table table-striped">
	
	 <?php
	
	if($data!=0 )
	{
	foreach($data as $rows)
	{
	
	?> 
 
		 
		<tr>
			 
			<td style="width: 550px; vertical-align: top; font-size: 0.9em;">
			<div>
				Pengepost Testimoni :<?php echo $rows['nama']; ?>
				<div>Tentang : <?php echo $rows['tentang']; ?>
				<div>Isi Testimoni :  <?php echo $rows['isi_testi']; ?> 
				<div>Waktu Posting : <?php echo $rows['waktu_posting']; ?> 
			</td>
			 		 
			</td>
        </tr>
	 <?php
		}
	}
	else
	{
	?>
		<tr>
			<td colspan="2">Testimoni Tidak Ada</td>
		</tr>
	<?php
	}
	?>
	</table>
</div>
	 
 
	
	
<?php
	}
	include_once('themes/footer.php');
?>

<script type="text/javascript">
	var url;
	{
		$('#testimoniList').show();
		 	 		return false;
	}
</script>
